<?php

//session_start();

require_once "core-application/class.bank.php";

$user_id	= $_SESSION['cid'];
$user_name	= $_SESSION['cname'];

/*$query = "SELECT * FROM bank WHERE user_id = $user_id";

if ($results = $db->query($query)){
	$count = $results->num_rows;
	// Se il conto � esistente, lo mostra
	if ($count == 1){
	$row = $results->fetch_assoc();
	$query1 = "SELECT user_money FROM users WHERE user_id = '$user_id'";
	if ($results1 = $db->query($query1)){
	$row1 = $results1->fetch_assoc();
	$user_money = $row1['user_money'];
	$results1->close();
	}
	$content = '<div class="box_content">
	<strong>Soldi in tasca:</strong> '.$user_money.' '.$g_currency.'<br />
	<strong>Bilancio:</strong> '.$row['account_balance'].' '.$g_currency.'<br />

	<h1>Azioni</h1>
	<form action="bank-execute.php" method="post">
	<h2>Deposita</h2>
	<input type="hidden" name="action" value="2" />
	<input type="text" name="money_num" value="" id="money_num"/><label for="money_num">Quota</label>
	<input type="submit" value="Deposita" />
	</form>
	<form action="bank-execute.php" method="post">
	<h2>Ritira</h2>
	<input type="hidden" name="action" value="3" />
	<input type="text" name="money_num" value="" id="money_num"/><label for="money_num">Quota</label>
	<input type="submit" value="Ritira" />
	</form>
	</div>';
	$account_balance = $row['account_balance'];
	$account_id = $row['account_id'];
	}else{ // Se non esiste, mostra il form per crearlo
	$content = '<div class="box_content">
	<h1>Conto Inesistente</h1>
	<form action="bank-execute.php" method="post">
	<h2>Crea conto</h2>
	Non c\'� nessun conto associato a questo personaggio.<br />
	Con un versamento base di 50 '.$g_currency.' puoi aprirne uno.<br />
	<input type="hidden" name="action" value="1" />
	<input type="text" name="money_num" value="" id="money_num"/><label for="money_num">Quota</label>
	<input type="submit" value="Crea Conto" />
	</form>
	</div>';
	}
}*/







?>
